{% extends "skeleton.html" %}
{% import "issues/macros.html" as m %}

{% block header %}
  {{m.html_header(resource_version)}}
{% endblock %}
{% block pagetitle %}Issues{% endblock %}
{% block title %}Issues{% endblock %}

{% block maincontent %}
  <section class="content">
    <nav class="breadcrumbs">
      <ul>
        <li><a href="/">War Worlds</a>
        <li><span>Issues</span>
      </ul>
    </nav>

    <section class="blurb">
      <p>Below are all the current known issues for War Worlds. Use the controls below to filter issues, or to
      report a new one (please try to search before reporting a duplicate issue).</p>
    </section>

    <nav class="issue-controls">
      <ul class="left">
        <li><a href="/issues/new" class="button">Report Issue</a>
      </ul>
      <form>
        <ul class="right">
          <li><div class="input-button"><input type="submit" value="Search" /></div>
          <li>
            <select name="filter">
              <option value="open">Open Issues
              <option value="closed">Closed Issues
            </select>
          <li><input type="text" name="q">
          <li>Search:</li>
        </ul>
      </form>
    </nav>

    <table class="issue-list">
      <tr>
        <th>ID</th>
        <th>Summary</th>
        <th>Priority</th>
        <th>Type</th>
      </tr>
    {%- for issue in issues %}
      <tr class="{{ loop.cycle('odd', 'even') }}">
        <td><a href="/issues/{{issue.key().id()}}">{{issue.key().id()}}</a></td>
        <td>{{issue.summary}}</td>
        <td>{{issue.priority}}</td>
        <td>{{issue.type}}</td>
      </tr>
    {% endfor %}
    </table>
  </section>
{% endblock %}
